from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog, QPushButton


class CropDialog(QDialog):
    def __init__(self, para, pos_x, pos_y):
        super().__init__(para)
        self.setWindowModality(Qt.WindowModal)
        self.setWindowFlags(Qt.FramelessWindowHint)
        self.setGeometry(pos_x, pos_y, 80, 40)

        self.SaveBtn = QPushButton(self)
        self.SaveBtn.setText('✓')
        self.SaveBtn.setFixedSize(30, 30)
        self.SaveBtn.move(10, 10)
        # self.SaveBtn.clicked.connect(para.crop_exit)

        self.CancelBtn = QPushButton(self)
        self.CancelBtn.setText('✕')
        self.CancelBtn.setFixedSize(30, 30)
        self.CancelBtn.move(50, 10)
        # self.CancelBtn.clicked.connect(para.crop_exit)
